#ifndef __SOCKET_H__
#define __SOCKET_H__
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <string>
using namespace std;

class Socket
{
protected:
	int m_fd;
public:
	Socket(void);
	~Socket(void);
public:
	int Recv(void*, int);
	int Send(const void*, int);
public:
	int RecvOob(void*, int);
	int SendOob(const void*, int);
public:
	bool Block(void);
	bool Unblock(void);
	int GetSocket(void);
	void SetSocket(int);
	bool ReuseAddress(bool);
public:
	bool Close(void);
};

#endif//__SOCKET_H__
